$(function(argument) {
	// 获取sid
	var sid = window.sessionStorage.getItem("sid");
	console.log(sid);
	// 渲染页面
	$.ajax({
		url: 'http://www.test.manage.teaweilai.com/Admin/AppSellerInfo/SellerInfo',
		type: 'POST',
		dataType: 'json',
		data: {
			sid: sid
		},
		success: function(data) {
			console.log(data);
			var strShop = template("shops", {
				shop: data
			});
			$(".shop .address").html(strShop);
			// 标题
			var strShopTitle = template("shopTitle", {
				shop: data
			});
			$(".shopT").html(strShopTitle);
			var strTL = template("waterBusiness", {
				fenlei: data.sing.seller_cate
			});
			$(".goodsContainer").html(strTL);
			//图片轮播效果
			var strLi = template('carouselLi', {
				cal: data
			});
			$(".carousel-indicators").html(strLi);
			var strImg = template('carouselImg', {
				cal: data
			});
			$(".carousel-inner").html(strImg);
		}

	})



	// 返回上一页面

	$(document).on("click", '.historyTS', function(e) {
			e.preventDefault();
			window.history.back();
		})
		// 点击商品
	$(document).on("click", ".goods", function(e) {
		e.preventDefault();
		var gid = $(this).eq(0).eq(0).attr('data-goods_id');
		window.sessionStorage.setItem("gid", gid);
		window.location.href = "tea_detail.html";
	})
})